<#import "/spring.ftl" as spring />
<#import "/inspector-time-macros.ftl" as imacro />
<html>
<head>
	<title>Scheduler</title>
</head>
<body>
<div id="content">

	<h1>SCHEDULER PROFILE</h1>
	
	<#if scheduler.id??>
		<p>Please edit any of the fields below and click "SAVE" to update your scheduler's information.</p>
	<#else>
		<p>Please fill out the fields below to add the details of someone associated with your company 
		   who is responsible for scheduling your inspections.</p>
	</#if>
	
	<p>
		COMPANY INFO:<br />
		${scheduler.company.name} (${scheduler.company.shortName})<br/>
		${scheduler.company.address.street1}<br />
		${scheduler.company.address.city}, ${scheduler.company.address.state} ${scheduler.company.address.zipCode}<br />
		</p>
	
	<@imacro.listErrors "scheduler" />
	
	<form action="editSchedulerProfile.html" method="post">
		<@spring.formHiddenInput "scheduler.id" />
		
		<div class="formElement"><label>FIRST NAME<span class="required">*</span></label><@spring.formInput "scheduler.name.first", 'size="30"'/></div>
		<div class="formElement"><label>LAST NAME<span class="required">*</span></label><@spring.formInput "scheduler.name.last", 'size="30"'/></div>
		<div class="formElemRow"></div>
		<div class="formElement"><label>EMAIL ADDRESS<span class="required">*</span></label><@spring.formInput "scheduler.email", 'size="30"'/></div>
		<div class="formElement"><label>CONFIRM EMAIL ADDRESS<span class="required">*</span></label><@spring.formInput "scheduler.emailConfirm", 'size="30"'/></div>
		<div class="formElemRow"></div>
		<div class="formElement"><label>USERNAME<span class="required">*</span></label><@spring.formInput "scheduler.userName", 'size="30"'/></div>
		<div class="formElement"><label>NEW PASSWORD</label><@spring.formPasswordInput "scheduler.password", 'size="30"'/></div>
		<div class="formElemRow"></div>
		<div class="formElement"><label>PHONE</label><@spring.formInput "scheduler.phone", 'size="30", maxlength="20"'/></div>
		<div class="formElemRow"></div>
		<br class="clearAll" />

		<input type="submit" value="SAVE" class="formButton"/>
		<a href="deleteSchedulerProfile.html?id=${scheduler.id}" class="formLink">-REMOVE-</a>
		<a href="settings.html" class="formLink">-CANCEL-</a>
	
	</form>
</div>
</body>
</html>
